package com.hy.erp.inventory.pojo;

import java.util.Date ;

import javax.persistence.Column ;
import javax.persistence.Entity ;
import javax.persistence.FetchType ;
import javax.persistence.NamedQuery ;
import javax.persistence.OneToOne ;
import javax.persistence.Table ;

import org.hibernate.annotations.Index ;
import org.jboss.seam.annotations.Name ;

import com.hy.erp.inventory.dao.interfaces.IRewardsPunishmentDao;
import com.hy.erp.inventory.pojo.interfaces.IRewardsPunishment;
import com.hy.erp.inventory.vsoft.libra.enterprise.framework.persistence.api.annotation.DaoA;
import com.hy.erp.inventory.vsoft.libra.enterprise.framework.persistence.entity.AbstractPersistentEntity;
import com.hy.mydesktop.shared.persistence.domain.gxt.MyBaseModel;

/**
 * 
 * <ul>
 * <li>开发作者：李冰</li>
 * <li>设计日期：2010-10-6；时间：下午02:56:53</li>
 * <li>类型名称：RewardsPunishment</li>
 * <li>设计目的：奖惩历史</li>
 * </ul>
 * <ul>
 * <b>修订编号：</b>
 * <li>修订日期：</li>
 * <li>修订作者：</li>
 * <li>修订原因：</li>
 * <li>修订内容：</li>
 * </ul>
 */
/*@Entity
@Table(name="rewardsPunishment")
@Name("rewardsPunishment")
@DaoA(IRewardsPunishmentDao.class)
@ NamedQuery ( name = "findRewardsPunishmentByPersonId" , query = "select p.rewardsPunishment from Person p where p.identifier=?")
*/
//public class RewardsPunishment extends AbstractPersistentEntity implements IRewardsPunishment
public class RewardsPunishment extends MyBaseModel //implements IPositonType
{

	/**
	 * <ul>
	 * <li>开发作者：李冰</li>
	 * <li>设计日期：2010-10-6；时间：下午02:57:51</li>
	 * <li>字段类型：long；字段名称：serialVersionUID</li>
	 * <li>设计目的：</li>
	 * </ul>
	 * <ul>
	 * <b>修订编号：</b>
	 * <li>修订日期：</li>
	 * <li>修订作者：</li>
	 * <li>修订原因：</li>
	 * <li>修订内容：</li>
	 * </ul>
	 */
	private static final long	serialVersionUID	=
														- 8980125315684722953L ;

	

	public RewardsPunishment ( )
	{
		super ( ) ;
	}

	
	

	@ Column ( name = "name" , length = 50)
	@ Index ( name = "nameIndex" )
	public String getName ( )
	{
		return this.get(IRewardsPunishment.NAME) ;
	}

	public void setName (
							String name )
	{
		super.set(IRewardsPunishment.NAME, name);
	}
	@OneToOne(targetEntity=RewardsPunishmentStyle.class,fetch=FetchType.LAZY)
	public RewardsPunishmentStyle getRewardsPunishmentStyle ( )
	{
		return this.get(IRewardsPunishment.REWARDSPUNISHMENTSTYLE) ;
	}

	public void setRewardsPunishmentStyle (
											RewardsPunishmentStyle rewardsPunishmentStyle )
	{
		super.set(IRewardsPunishment.REWARDSPUNISHMENTSTYLE, rewardsPunishmentStyle);
	}
	@ Column ( name = "reason" , length = 50)
	@ Index ( name = "reasonIndex" )
	public String getReason ( )
	{
		return this.get(IRewardsPunishment.REASON) ;
	}

	public void setReason (
							String reason )
	{
		super.set(IRewardsPunishment.REASON, reason);
	}
	@ Column ( name = "rewardsPunishmentDate" , length = 50)
	@ Index ( name = "rewardsPunishmentDateIndex" )
	public Date getRewardsPunishmentDate ( )
	{
		return this.get(IRewardsPunishment.REWARDSPUNISHMENTDATE) ;
	}

	public void setRewardsPunishmentDate (
											Date rewardsPunishmentDate )
	{
		super.set(IRewardsPunishment.REWARDSPUNISHMENTDATE, rewardsPunishmentDate);
	}
	
	
	
}
